<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
<title>Edit staff details</title>
<SCRIPT TYPE="text/javascript" src= "../../commonutils/util/util.js"> </SCRIPT>
</head>
<style type="text/css">
th {text-align: right}
</style>
<body>
<?php include 'top.html' ?>
<?php include '../../authorization_check.php'; ?>
<?php include '../../checkRootOnly.php'; ?>

<?php
	session_start();
?>

<?php
require_once '../../commonutils/db/DBConnectionManager.php';


	echo "<center><h1>User Info</h1></center>";
	echo "<center><table border=\"1\" width=\"71%\" id=\"table1\">";
	echo "<tr>";
	echo "<td width=\"95\">User Name</td>";
	echo "<td width=\"65\">First Name</td>";
	echo "<td width=\"126\">Last Name</td>";
	echo "<td width=\"224\">User Type</td>";
	echo "<td width=\"224\">Program Code</td>";
	echo "</tr>";
	

	$sqlquery = "select * from user";
	
	$result = DBConnectionManager::query($sqlquery);
	while($row = mysql_fetch_assoc($result))
	{
		echo "<td width=\"95\">".$row['userName']."</td>";
		echo "<td width=\"65\">".$row['firstName']."</td>";
		echo "<td width=\"126\">".$row['lastName']." ".$row['lName']."</td>";
		echo "<td width=\"224\">".$row['userType']."</td>";
		echo "<td width=\"224\">".$row['programCode']."</td>";
		echo "</tr>";
	}	
	echo "</table>";
	echo "</center>";
?>

<br>
<hr color="blue">
<p>
  <a href="../../SecurityIndex.php">Back</a>
</p>
</body>
</html>